package org.gruposp2p.aula.gwt.client.event;

import org.gruposp2p.aula.gwt.client.model.Coursegroup;
import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;

public class CoursegroupChangeEvent extends GwtEvent {
	
	   private static final GwtEvent.Type TYPE = new GwtEvent.Type();
	   private Coursegroup coursegroup;
	   
	   public static GwtEvent.Type getType(){
	      return TYPE;
	   }
	

	@Override
	public Type getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(EventHandler handler) {
		((CoursegroupChangeHandler)handler).processCoursegroup(this);		
	}

	public void setCoursegroup (Coursegroup coursegroup) {
		this.coursegroup = coursegroup;
	}
	
	public Coursegroup getCoursegroup() {
		return coursegroup;
	}
}